package cn.zane.principle.richterSubstitutionPrinciple.design;

import lombok.extern.slf4j.Slf4j;

import java.math.BigDecimal;

/**
 * @Author: zane
 * @Date: 2024/12/16
 * @Description: 信用卡
 */
@Slf4j
public class CreditCard extends CashCard {

    public CreditCard(String cardNo,String cardDate){
        super(cardNo,cardDate);
    }

    public String withdrawal(String orderId, BigDecimal amount) {
        log.info("生成贷款单，单号:{} 金额:{}", orderId, amount);
        log.info("贷款成功，单号:{} 金额:{}", orderId, amount);
        return super.negative(orderId, amount);
    }

    public String recharge(String orderId, BigDecimal amount) {
        log.info("生成还款单，单号:{} 金额:{}", orderId, amount);
        log.info("还款成功，单号:{} 金额:{}", orderId, amount);
        return super.positive(orderId, amount);
    }
}
